package cn.initcap.designpattern.pattern.structural.adapter;

/**
 * @author initcap
 * @date 2018/8/28 AM9:10
 */
public class PowerAdapter implements Dc5 {

    private Ac220 ac220 = new Ac220();

    @Override
    public int outputDc5v() {
        int adapterInput = ac220.outputAc220v();
        //变压器...
        int adapterOutput = adapterInput / 44;

        System.out.println("使用PowerAdapter输入AC:" + adapterInput + "V" + "输出DC:" + adapterOutput + "V");
        return adapterOutput;
    }
}
